PATH
WebObjects 4.5 Documentation >
EOF Tools and Techniques
Table of Contents
Previous Section
You can assign stored procedures to entities to be used to perform the following operations:
If you associate a stored procedure with an entity's operation, the Framework invokes it automatically when the operation occurs. For example, if you want to use a stored procedure to insert new Customer objects:
- Define the stored procedure in the database.
- Define the stored procedure in the model as described in the previous section.
- Associate the stored procedure with the Customer entity's insert operation.
You can associate a stored procedure with an entity using EOModeler or you can do it programmatically (see the chapter "Answers to Common Design Questions" in the book Enterprise Objects Framework Developer's Guide).
To assign a stored procedure to an entity in EOModeler:
- Select the entity with which you want to associate a stored procedure.
- Open the inspector.
- Click the Stored Procedures Inspector icon.

- Type the name of the stored procedure in the field associated with the appropriate database operation.

Figure 39. The Stored Procedure Inspector
Requirements for Framework-Invoked Stored Procedures
When Enterprise Objects Framework invokes a stored procedure for an operation, the procedure must behave in an expected way. The Framework specifies what a stored procedure's arguments, results, and return values should be. For more information on these requirements, see the chapter "Answers to Common Design Questions" in the book Enterprise Objects Framework Developer's Guide.
Table of Contents
Next Section